# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=akonadi-import-wizard
pkgver=24.08.2
pkgrel=0
# ppc64le, s390x, riscv64, armhf, armv7 and loongarch64 blocked by qt6-qtwebengine -> libkgapi -> kmailtransport
arch="all !armhf !ppc64le !s390x !riscv64 !armv7 !loongarch64"
url="https://kontact.kde.org/"
pkgdesc="Import data from other mail clients to KMail"
license="GPL-2.0-or-later AND LGPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	akonadi-dev
	extra-cmake-modules
	kauth-dev
	kconfig-dev
	kcontacts-dev
	kcrash-dev
	kdbusaddons-dev
	kdoctools-dev
	kidentitymanagement-dev
	kio-dev
	kmailtransport-dev
	kwallet-dev
	libkdepim-dev
	mailcommon-dev
	messagelib-dev
	pimcommon-dev
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/pim/akonadi-import-wizard.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadi-import-wizard-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
99904c6840ebe6df9bc60490fbfa77f5329a8045995563683ed8c26ef1e3dd87520f3e208069020a3a1984827dfd639fff7873c73f6a07e00e19e9cb8cbe3065  akonadi-import-wizard-24.08.2.tar.xz
"
